package com.example.rabbitmq.controller;

import com.example.rabbitmq.service.RabbitMqManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author malty
 */
@RestController
@RequestMapping
public class RabbitController {
    @Autowired
    private RabbitMqManager rabbitMqManager;

    @GetMapping("/send")
    public String send(String message) {
        rabbitMqManager.send(message);
        return "ok";
    }
}
